package worldinruin.core.imp.soldiers;

import worldinruin.core.ICloseCombatSoldier;
import worldinruin.core.IRangedSoldier;
import worldinruin.core.IResources;
import worldinruin.core.ISoldier;
import worldinruin.core.IType;
import worldinruin.core.imp.Resources;

public class Archer implements IRangedSoldier, ICloseCombatSoldier {	
	
	private static int attack = 40;
	private static int defense = 20;
	private static int speed = 2;
	private IType soldierType = SoldierTypes.ARCHER;
	private static String name = "Archer";
	private static IResources price = new Resources(5,5,5,5);
	
	@Override
	public int getAttack(){
		return attack;
	}
	
	@Override
	public int getDefense(){
		return defense;		
	}
	
	@Override
	public int getSpeed(){
		return speed;
	}

	@Override
	public IResources getPrice() {
		return price;
	}
	
	@Override
	public boolean equals(Object o){
		return getClass().equals(o.getClass());
	}
	
	@Override
	public int hashCode(){
		return getClass().hashCode();
	}

	@Override
	public IType getSoldierType() {
		return soldierType;
	}

	@Override
	public int compareTo(ISoldier s) {
		return new Integer(getDefense()).compareTo(new Integer(s.getDefense()));
	}
	
}
